-- BEGIN;
-- INSERT INTO `gen_datasource_conf` (`id`, `name`, `url`, `username`, `password`, `ds_type`, `conf_type`, `ds_name`, `instance`, `port`, `host`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (1821537418570964918, 'ai', 'jdbc:mysql://127.0.0.1:3306/e_ai?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai', 'elsfs', 'hdPz1O79URsUQTszIHtotFnHy5bR72R2pwUiQM4f8vP9FT7Jhf3tW0msUnYFTyFX', 'mysql', '1', 'e_ai', NULL, NULL, NULL, '1', NULL, NULL, '2025-04-24 04:17:36', 'admin', '0');
-- INSERT INTO `gen_datasource_conf` (`id`, `name`, `url`, `username`, `password`, `ds_type`, `conf_type`, `ds_name`, `instance`, `port`, `host`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (1821537418570964990, 'oauth2', 'jdbc:mysql://127.0.0.1:3306/e_oauth?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai', 'elsfs', 'hdPz1O79URsUQTszIHtotFnHy5bR72R2pwUiQM4f8vP9FT7Jhf3tW0msUnYFTyFX', 'mysql', '1', 'e_oauth', NULL, NULL, NULL, '1', '2025-04-24 01:27:06', NULL, NULL, NULL, '0');
-- INSERT INTO `gen_datasource_conf` (`id`, `name`, `url`, `username`, `password`, `ds_type`, `conf_type`, `ds_name`, `instance`, `port`, `host`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (1821537418570964995, 'cms', 'jdbc:mysql://127.0.0.1:3306/e_cms?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai', 'elsfs', 'hdPz1O79URsUQTszIHtotFnHy5bR72R2pwUiQM4f8vP9FT7Jhf3tW0msUnYFTyFX', 'mysql', '1', 'cms', NULL, NULL, NULL, '1', NULL, NULL, NULL, NULL, '0');
-- INSERT INTO `gen_datasource_conf` (`id`, `name`, `url`, `username`, `password`, `ds_type`, `conf_type`, `ds_name`, `instance`, `port`, `host`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (1821537418570964996, 'std', 'jdbc:mysql://127.0.0.1:3306/e_std?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai', 'elsfs', 'hdPz1O79URsUQTszIHtotFnHy5bR72R2pwUiQM4f8vP9FT7Jhf3tW0msUnYFTyFX', 'mysql', '1', 'e_std', NULL, NULL, NULL, '1', NULL, NULL, NULL, NULL, '0');
-- INSERT INTO `gen_datasource_conf` (`id`, `name`, `url`, `username`, `password`, `ds_type`, `conf_type`, `ds_name`, `instance`, `port`, `host`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (1821537418570964997, 'admin', 'jdbc:mysql://127.0.0.1:3306/e_admin?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai', 'elsfs', 'hdPz1O79URsUQTszIHtotFnHy5bR72R2pwUiQM4f8vP9FT7Jhf3tW0msUnYFTyFX', 'mysql', '1', 'e_admin', NULL, NULL, NULL, '1', NULL, NULL, '2025-04-24 04:17:36', 'admin', '0');
-- COMMIT;


-- ----------------------------
-- Records of gen_field_type
-- ----------------------------
BEGIN;
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (1, 'datetime', 'ZonedDateTime', 'java.time.ZonedDateTime', '1', '2024-08-16 08:45:10', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (2, 'date', 'LocalDate', 'java.time.LocalDate', '1', '2024-08-16 08:45:10', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (3, 'tinyint', 'Integer', NULL, '1', '2024-08-16 20:45:11', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (4, 'smallint', 'Integer', NULL, '1', '2024-08-16 20:45:11', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (5, 'mediumint', 'Integer', NULL, '1', '2024-08-16 20:45:11', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (6, 'int', 'Integer', NULL, '1', '2024-08-16 20:45:11', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (7, 'integer', 'Integer', NULL, '1', '2024-08-16 20:45:11', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (8, 'bigint', 'Long', NULL, '1', '2024-08-16 20:45:11', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (9, 'float', 'Float', NULL, '1', '2024-08-16 20:45:11', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (10, 'double', 'Double', NULL, '1', '2024-08-16 20:45:11', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (11, 'decimal', 'BigDecimal', 'java.math.BigDecimal', '1', '2024-08-16 20:45:11', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (12, 'bit', 'Boolean', NULL, '1', '2024-08-16 20:45:11', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (13, 'char', 'String', NULL, '1', '2024-08-16 20:45:11', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (14, 'varchar', 'String', NULL, '1', '2024-08-16 20:45:11', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (15, 'tinytext', 'String', NULL, '1', '2024-08-16 20:45:11', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (16, 'text', 'String', NULL, '1', '2024-08-16 20:45:11', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (17, 'mediumtext', 'String', NULL, '1', '2024-08-16 20:45:11', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (18, 'longtext', 'String', NULL, '1', '2024-08-16 20:45:11', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (19, 'timestamp', 'LocalDateTime', 'java.time.LocalDateTime', '1', '2024-08-16 20:45:11', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (20, 'NUMBER', 'Integer', NULL, '1', '2024-08-16 20:45:11', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (21, 'BINARY_INTEGER', 'Integer', NULL, '1', '2024-08-16 08:45:12', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (22, 'BINARY_FLOAT', 'Float', NULL, '1', '2024-08-16 08:45:12', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (23, 'BINARY_DOUBLE', 'Double', NULL, '1', '2024-08-16 08:45:12', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (24, 'VARCHAR2', 'String', NULL, '1', '2024-08-16 08:45:12', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (25, 'NVARCHAR', 'String', NULL, '1', '2024-08-16 08:45:12', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (26, 'NVARCHAR2', 'String', NULL, '1', '2024-08-16 08:45:12', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (27, 'CLOB', 'String', NULL, '1', '2024-08-16 08:45:12', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (28, 'int8', 'Long', NULL, '1', '2024-08-16 08:45:12', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (29, 'int4', 'Integer', NULL, '1', '2024-08-16 08:45:12', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (30, 'int2', 'Integer', NULL, '1', '2024-08-16 08:45:12', NULL, '2025-05-05 02:29:01', 'admin', '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (31, 'numeric', 'BigDecimal', 'java.math.BigDecimal', '1', '2024-08-16 08:45:12', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (32, 'json', 'String', NULL, '1', '2024-08-16 08:45:12', NULL, NULL, NULL, '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (1919033188291985409, 'int21', 'Integer', NULL, '1', '2025-05-04 22:15:41', 'admin', '2025-05-04 22:15:41', 'admin', '0');
INSERT INTO `gen_field_type` (`id`, `column_type`, `attr_type`, `package_name`, `state`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (1919096888269033474, 'int22', 'Integer', NULL, '1', '2025-05-05 02:28:48', 'admin', '2025-05-05 02:28:48', 'admin', '0');
COMMIT;


-- ----------------------------
-- Records of gen_group
-- ----------------------------
BEGIN;
INSERT INTO `gen_group` (`id`, `group_name`, `group_desc`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (1, '增删改查', '单表增删改查', '2024-08-14 13:04:41', NULL, '2025-05-02 03:48:52', 'admin', '0');
INSERT INTO `gen_group` (`id`, `group_name`, `group_desc`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (1918331138302320642, '单表增删改查', '单表增删改查', '2025-05-02 23:45:59', 'admin', '2025-05-15 02:07:25', 'admin', '0');
COMMIT;


-- ----------------------------
-- Records of gen_template
-- ----------------------------
BEGIN;
INSERT INTO `gen_template` (`id`, `template_name`, `generator_path`, `template_desc`, `template_code`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (1, 'Controller', '${moduleName}/${moduleName}-biz/src/main/java/${packagePath}/module/${moduleName}/biz/controller/${className}Controller.java', '控制器', 'package ${packageName}.module.${moduleName}.biz.controller;\n\nimport io.swagger.v3.oas.annotations.security.SecurityRequirement;\nimport io.swagger.v3.oas.annotations.tags.Tag;\nimport lombok.RequiredArgsConstructor;\nimport org.elsfs.cloud.common.controller.ControllerConfig;\nimport org.elsfs.cloud.common.controller.LogicRepositoryCrudController;\nimport ${packageName}.module.${moduleName}.api.entity.${className};\nimport ${packageName}.module.${moduleName}.biz.repository.${className}Repository;\nimport org.springframework.http.HttpHeaders;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RestController;\n\n\n/**\n * ${tableComment}\n *\n * @author ${author}\n */\n@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)\n@RestController\n@RequestMapping(\"/${functionName}\")\n@RequiredArgsConstructor\n@Tag(description = \"dept\", name = \"${tableComment}管理\")\npublic class SysDeptController\n    extends LogicRepositoryCrudController<\n        ${className}, ${className}, ${className}, ${className}, ${className}Repository, String> {\n  @Override\n  protected ControllerConfig getConfig() {\n    return super.getConfig().list(true);\n  }\n}\n', '2025-05-01 15:20:00', NULL, '2025-05-03 00:41:00', 'admin', '0');
INSERT INTO `gen_template` (`id`, `template_name`, `generator_path`, `template_desc`, `template_code`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (2, 'Entity', '${moduleName}/${moduleName}-api/src/main/java/${packagePath}/module/${moduleName}/api/entity/${className}.java', '实体', 'package ${packageName}.module.${moduleName}.api.entity;\n\nimport com.baomidou.mybatisplus.annotation.FieldFill;\nimport com.baomidou.mybatisplus.annotation.FieldStrategy;\nimport com.baomidou.mybatisplus.annotation.IdType;\nimport com.baomidou.mybatisplus.annotation.SqlCondition;\nimport com.baomidou.mybatisplus.annotation.TableField;\nimport com.baomidou.mybatisplus.annotation.TableId;\nimport com.baomidou.mybatisplus.annotation.TableName;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport jakarta.validation.constraints.NotBlank;\nimport lombok.Data;\nimport lombok.EqualsAndHashCode;\nimport org.elsfs.cloud.api.validation.group.GroupValidation;\nimport org.elsfs.cloud.common.core.entity.BaseEntity;\n\n/**\n * ${tableComment}\n *\n * @author ${author}\n */\n@Data\n@TableName(\"${tableName}\")\n@EqualsAndHashCode(callSuper = true)\n@Schema(description = \"${tableComment}\")\npublic class ${className} extends BaseEntity {\n    ## ----------  BEGIN 字段循环遍历  ----------\n #foreach($field in $fieldList)\n     #if($field.isIgnoreFieldName == false)\n\n     /**\n     * ${field.columnComment}\n     */\n      #if($field.isPrimaryKey == true)\n      ## 主键\n          \n     @TableId(value = \"${field.columnName}\", type = IdType.AUTO)\n       #else\n           \n     @TableField(value = \"${field.columnName}\", condition = SqlCondition.EQUAL, whereStrategy = FieldStrategy.NOT_EMPTY)\n      #end\n	  \n     @NotBlank(message = \"${field.columnComment}不能为空\", groups = {GroupValidation.Edit.class})   \n    @Schema(description = \"${field.columnComment}\")\n     private String ${field.fieldName};\n     #end\n #end\n}\n\n\n\n', '2025-05-01 15:20:00', NULL, '2025-05-03 00:41:00', 'admin', '0');
INSERT INTO `gen_template` (`id`, `template_name`, `generator_path`, `template_desc`, `template_code`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (1922366833029341185, 'Repository', '${moduleName}/${moduleName}-biz/src/main/java/${packagePath}/module/${moduleName}/biz/repository/${className}Repository.java', 'Repository', 'package ${packageName}.module.${moduleName}.biz.repository;\n\nimport org.elsfs.cloud.common.mybatis.repository.IElsfsRepository;\nimport ${packageName}.module.${moduleName}.api.entity.${className};\n\n\n/**\n * ${tableComment}Repository\n *  \n * @author ${author}\n */\n\npublic interface ${className}Repository extends IElsfsRepository<${className}, String> {\n\n}', '2025-05-14 03:02:00', 'admin', '2025-05-14 03:02:00', 'admin', '0');
INSERT INTO `gen_template` (`id`, `template_name`, `generator_path`, `template_desc`, `template_code`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (1922369041217150978, 'RepositoryImpl', '${moduleName}/${moduleName}-biz/src/main/java/${packagePath}/module/${moduleName}/biz/repository/impl/${className}RepositoryImpl.java', 'RepositoryImpl', 'package ${packageName}.module.${moduleName}.biz.repository.impl;\n\nimport org.elsfs.cloud.common.mybatis.repository.ElsfsCrudRepositoryImpl;\nimport ${packageName}.module.${moduleName}.api.entity.${className};\nimport ${packageName}.module.${moduleName}.biz.repository.${className}Repository;\nimport ${packageName}.module.${moduleName}.biz.repository.mapper.${className}Mapper;\nimport org.springframework.stereotype.Service;\n\n/**\n * ${tableComment}RepositoryImpl\n *\n * @author ${author}\n */\n@Service\npublic class ${className}RepositoryImpl\n  extends ElsfsCrudRepositoryImpl<${className}Mapper, ${className}, String>\n  implements ${className}Repository {\n}', '2025-05-14 03:11:00', 'admin', '2025-05-14 03:11:00', 'admin', '0');
INSERT INTO `gen_template` (`id`, `template_name`, `generator_path`, `template_desc`, `template_code`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (1922370732553461762, 'Mapper', '${moduleName}/${moduleName}-biz/src/main/java/${packagePath}/module/${moduleName}/biz/repository/mapper/${className}Mapper.java', 'Mapper', 'package ${packageName}.module.${moduleName}.biz.repository.mapper;\n\nimport com.baomidou.dynamic.datasource.annotation.DS;\nimport org.apache.ibatis.annotations.Mapper;\nimport org.elsfs.cloud.common.mybatis.context.ELsfsBaseMapper;\nimport ${packageName}.module.${moduleName}.api.entity.${className};\nimport org.elsfs.cloud.module.dict.api.constant.DatasourceNameConstant;\n\n/**\n * ${tableComment}Mapper\n *\n * @author ${author}\n */\n@Mapper\n@DS(DatasourceNameConstant.ADMIN)\npublic interface ${className}Mapper extends ELsfsBaseMapper<${className}> {\n}', '2025-05-14 03:17:00', 'admin', '2025-05-14 03:17:00', 'admin', '0');
INSERT INTO `gen_template` (`id`, `template_name`, `generator_path`, `template_desc`, `template_code`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (1922708539352367106, 'api', '${moduleName}/from/src/api/${moduleName}/${functionName}.ts', 'api', 'import { useRequest } from \'#/api/core/api\';\n\nexport const { useRequestHandle, requestPath } = useRequest(\'/${functionName}\');\n\n\n/**\n * ${tableComment}\n */\nexport interface  ${className}{\n    ## ----------  BEGIN 字段循环遍历  ----------\n 	#foreach($field in $fieldList)\n     #if(!$field.isIgnoreFieldName)\n	   /**  ${field.columnComment} */\n	 ${field.fieldName}: string;\n     #end\n #end\n}\n', '2025-05-15 01:40:00', 'admin', '2025-05-15 01:40:00', 'admin', '0');
INSERT INTO `gen_template` (`id`, `template_name`, `generator_path`, `template_desc`, `template_code`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (1922708825139658754, 'index.vue', '${moduleName}/from/src/views/${moduleName}/${functionName}/index.vue', 'index.vue', '<script lang=\"ts\" setup>\nimport type { ExtendedVxeGridApi } from \'@vben/plugins/src/vxe-table/types\';\n\nimport type { ${className} } from \'#/api/${moduleName}/${functionName}\';\n\nimport { useVbenModal } from \'@vben/common-ui\';\n\nimport { ElButton } from \'element-plus\';\nimport { isArray } from \'lodash\';\n\nimport { useVbenVxeGrid } from \'#/adapter/vxe-table\';\nimport { useRequestHandle } from \'#/api/${moduleName}/${functionName}\';\n\nimport { gridOptions, searchFormOptions } from \'./${functionName}.data\';\nimport ${className}Modal from \'./${className}Modal.vue\';\n\nconst [Grid, gridApi]: [any, ExtendedVxeGridApi] = useVbenVxeGrid({\n  gridOptions,\n  formOptions: searchFormOptions,\n  showSearchForm: true,\n});\nconst [Modal, modalApi] = useVbenModal({\n  // 连接抽离的组件\n  connectedComponent: ${className}Modal,\n});\nfunction openModal(row: ${className}) {\n  modalApi.setData({\n    isUpdate: !!row,\n    data: row,\n  });\n  modalApi.open();\n}\nfunction deleteHandle(row: any | any[]) {\n  if (isArray(row)) {\n    useRequestHandle.del(\n      row.map((s) => s.id),\n      gridApi.reload,\n    );\n    return;\n  }\n  useRequestHandle.del(row.id, gridApi.reload);\n}\n</script>\n<template>\n  <div class=\"p-5\">\n    <Grid>\n      <template #toolbar-actions>\n        <ElButton type=\"primary\" @click=\"openModal(null)\"> 新增 </ElButton>\n      </template>\n      <template #action=\"{ row }\">\n        <ElButton link type=\"primary\" @click=\"openModal(row)\"> 编辑 </ElButton>\n        <ElButton link type=\"danger\" @click=\"deleteHandle(row)\">\n          删除\n        </ElButton>\n      </template>\n    </Grid>\n    <Modal @refresh=\"gridApi.reload\" />\n  </div>\n</template>\n', '2025-05-15 01:41:00', 'admin', '2025-05-15 01:41:00', 'admin', '0');
INSERT INTO `gen_template` (`id`, `template_name`, `generator_path`, `template_desc`, `template_code`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (1922714659387162626, 'data.ts', '${moduleName}/from/src/views/${moduleName}/${functionName}/${functionName}.data.ts', 'data.ts', 'import type { VxeGridProps, VxeGridPropTypes } from \'vxe-table\';\n\nimport type { VbenFormProps, VbenFormSchema } from \'#/adapter/form\';\nimport type { ${className} } from \'#/api/${moduleName}/${functionName}\';\n\nimport { useRequestHandle } from \'#/api/${moduleName}/${functionName}\';\nimport { merge } from \"lodash\";\n\n// 表单\nexport const formSchema: VbenFormSchema[] = [\n    ## ----------  BEGIN 字段循环遍历  ----------\n    #foreach($field in $fieldList)\n        #if(!$field.isIgnoreFieldName)\n\n{\n    label: \'${field.columnComment}\',\n    fieldName: \'${field.fieldName}\',\n    component: \'Input\',\n    \n    #if($field.isPrimaryKey == true)\n    \n    hideLabel: true,\n    componentProps: {\n    type: \'hidden\',\n    },\n    \n    #end\n    \n    },\n\n    #end\n\n#end\n];\n// 搜索\nexport const searchFormOptions: VbenFormProps = {\n// 默认展开\ncollapsed: false,\n// 控制表单是否显示折叠按钮\nshowCollapseButton: true,\nsubmitButtonOptions: {\ncontent: \'查询\',\n        },\n// 是否在字段值改变时提交表单\nsubmitOnChange: false,\n// 按下回车时是否提交表单\nsubmitOnEnter: false,\nschema: [\n    ## ----------  BEGIN 字段循环遍历  ----------\n    #foreach($field in $fieldList)\n        #if($field.isIgnoreFieldName == false)\n\n        {\n        component: \'Input\',\n        label: \'${field.columnComment}\',\n        fieldName: \'${field.fieldName}\',\n         },\n        #end\n    #end\n     ],\n};\n\n        const columns: VxeGridPropTypes.Columns<${className}> = [\n    #foreach($field in $fieldList)\n        #if($field.isIgnoreFieldName == false)\n                { field: \'${field.fieldName}\', title: \'${field.columnComment}\' },\n        #end\n    #end\n\n        {\nfield: \'action\',\nslots: { default: \'action\' },\ntitle: \'操作\',\n        },\n        ];\nexport const gridOptions: VxeGridProps.VxeGridProps<${className}> = {\ncolumns,\ntoolbarConfig: {\n// 是否显示搜索表单控制按钮\n// @ts-ignore 正式环境时有完整的类型声明\nenabled: true,\nsearch: false,\ncustom: false,\nexport: false,\n// import: true,\nrefresh: true,\nzoom: false,\n        },\nproxyConfig: {\nenabled: true,\nautoLoad: true,\najax: {\nquery: async ({ page }, formValues) => {\n                return useRequestHandle.page(\n          merge(\n            {\n              current: page.currentPage,\n              pages: page.pageSize,\n            },\n            formValues,\n          ),\n        );\n      },\n              },\n              },\nexportConfig: {\n// 导出文件名\nfilename: \'分组列表\',\n        },\n        };\n', '2025-05-15 02:04:00', 'admin', '2025-05-15 02:04:00', 'admin', '0');
INSERT INTO `gen_template` (`id`, `template_name`, `generator_path`, `template_desc`, `template_code`, `create_at`, `create_by`, `update_at`, `update_by`, `delete_flag`) VALUES (1922714825104113666, 'Modal.vue', '${moduleName}/from/src/views/${moduleName}/${functionName}/${className}Modal.vue', 'Modal.vue', '<script lang=\"ts\" setup>\nimport type { ${className} } from \'#/api/${moduleName}/${functionName}\';\n\nimport { defineEmits, ref } from \'vue\';\n\nimport { useVbenModal } from \'@vben/common-ui\';\n\nimport { useVbenForm } from \'#/adapter/form\';\nimport { useRequestHandle } from \'#/api/${moduleName}/${functionName}\';\n\nimport { formSchema } from \'./${functionName}.data\';\n\nconst emits = defineEmits([\'refresh\']);\n\nconst isUpdate = ref(false);\nconst data = ref<${className}>({});\nconst [Modal, modalApi] = useVbenModal({\n    // 显示关闭按钮\n    closable: true,\n    onCancel() {\n        modalApi.close();\n    },\n    // 显示确认按钮文本\n    showConfirmButton: false,\n    // 显示取消按钮\n    showCancelButton: false,\n    onOpenChange,\n});\nconst [BaseForm, formApi] = useVbenForm({\n    // 是否显示默认操作按钮\n    showDefaultActions: true,\n    schema: formSchema,\n    // 垂直布局，label和input在不同行，值为vertical\n    // 水平布局，label和input在同一行\n    layout: \'horizontal\',\n    wrapperClass: \'grid-cols-1\',\n    handleSubmit,\n    handleReset,\n});\nasync function handleSubmit(values: ${className}) {\n    isUpdate.value\n        ? await useRequestHandle.edit(values)\n        : await useRequestHandle.add(values);\n    modalApi.close();\n    emits(\'refresh\');\n}\nfunction handleReset() {\n    formApi.setValues(data.value);\n}\nasync function onOpenChange(isOpen: boolean) {\n    if (isOpen) {\n        const drawerData = modalApi.getData<Record<string, any>>();\n        isUpdate.value = !!drawerData.isUpdate;\n        if (drawerData?.data?.${primaryKey}) {\n            data.value = await useRequestHandle.getById(drawerData.data.${primaryKey});\n        }\n        formApi.setValues(data.value);\n    }\n}\n</script>\n\n<template>\n<Modal title=\"${tableComment}\"> <BaseForm /> </Modal>\n    </template>\n\n    <style scoped>\n/* 样式代码 */\n</style>\n', '2025-05-15 02:05:00', 'admin', '2025-05-15 02:05:00', 'admin', '0');
COMMIT;


-- ----------------------------
-- Records of gen_template_group
-- ----------------------------
BEGIN;
INSERT INTO `gen_template_group` (`group_id`, `template_id`) VALUES (1918331138302320642, 1);
INSERT INTO `gen_template_group` (`group_id`, `template_id`) VALUES (1918331138302320642, 2);
INSERT INTO `gen_template_group` (`group_id`, `template_id`) VALUES (1918331138302320642, 1922366833029341185);
INSERT INTO `gen_template_group` (`group_id`, `template_id`) VALUES (1918331138302320642, 1922369041217150978);
INSERT INTO `gen_template_group` (`group_id`, `template_id`) VALUES (1918331138302320642, 1922370732553461762);
INSERT INTO `gen_template_group` (`group_id`, `template_id`) VALUES (1918331138302320642, 1922708539352367106);
INSERT INTO `gen_template_group` (`group_id`, `template_id`) VALUES (1918331138302320642, 1922708825139658754);
INSERT INTO `gen_template_group` (`group_id`, `template_id`) VALUES (1918331138302320642, 1922714659387162626);
INSERT INTO `gen_template_group` (`group_id`, `template_id`) VALUES (1918331138302320642, 1922714825104113666);
COMMIT;
